package jvms;

/**
 * Created by pc on 2015/2/11.
 */
public class GCTest {
    public void finalize(){
        System.out.println("正在进行GC");
    }
    public static void main(String args[]){
        for (int i=0; i<4; i++){
            new GCTest();
            //通知系统回收，通常有效
            System.gc();
//            Runtime.getRuntime().gc();
        }
    }
}
